﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Manager.Options
{
    /// <summary>
    /// BIND configuration page for options window
    /// </summary>
    public partial class BindSettings : UserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BindSettings"/> class.
        /// </summary>
        public BindSettings()
        {
            InitializeComponent();
        }


        /// <summary>
        /// Gets the name of the service machine.
        /// </summary>
        /// <value>The name of the service machine.</value>
        public string ServiceMachineName
        {
            get
            {
                return serviceMachineNameTextBox.Text;
            }
        }

        /// <summary>
        /// Gets the name of the service.
        /// </summary>
        /// <value>The name of the service.</value>
        public string ServiceName
        {
            get
            {
                return serviceNameTextBox.Text;
            }
        }

        /// <summary>
        /// Gets the BIND directory path.
        /// </summary>
        /// <value>The BIND directory path.</value>
        public string BINDDirectoryPath
        {
            get
            {
                return bindDirectoryPathTextBox.Text;
            }
        }

        /// <summary>
        /// Handles the Click event of the directoryPathBrowserButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void directoryPathBrowserButton_Click(object sender, EventArgs e)
        {
            if (directoryPathFolderBrowserDialog.ShowDialog() == DialogResult.OK)
            {
                bindDirectoryPathTextBox.Text = directoryPathFolderBrowserDialog.SelectedPath;
            }
        }
    }
}
